<template>
  <div>
    <Scroll class="content" ref="scroll">
      <CartListItem v-for="(item,index) in cartList" :key="index" :itemInfo="item"></CartListItem>
    </Scroll>
  </div>
</template>

<style scoped>
  .content {
    margin-top: 44px;
    height: calc(100%- 44px);
    overflow: hidden;
  }
</style>

<script>
  import Scroll from 'components/scroll/scroll'
  import { mapGetters } from 'vuex'
  import CartListItem from './CartListItem'

  export default {
    name: 'CartList',
    //传参：父传子，写法：["形参1"[,"形参2"]]
    props: {

    },
    created() {

    },
    mounted() {

    },
    activated() {
      this.$refs.scroll.refresh()
    },
    data() {
      return {

      }
    },
    computed: {
      ...mapGetters([
        'cartList',
      ])
    },
    methods: {

    },
    mixins: [],
    components: {
      Scroll,
      CartListItem

    },
  }
</script>